/**
 * 定义测量工具插件功能
 */
Ext.define("wufe.util.map.MapMeasureTool", {

//	extend : 'OpenLayers.Control.Measure',

	//mixins:['OpenLayers.Control.Measure'],

	handleMeasurePartial : function(event) {
		alert("measure");
	},
	// 测量距离完成的时候触发事件
	handleMeasure : function(event) {
		var geometry = event.geometry;
		var units = event.units; // 面积或距离单位
		var order = event.order; // 命令ID
		var measure = event.measure;
		var out = "";
		if (order == 1) {
			out += "距离: " + measure.toFixed(3) + " " + this.UnitsToCHS(units);
		} else {
			out += "面积: " + measure.toFixed(3) + " 平方" + this.UnitsToCHS(units);
		}
		// 显示测量后的结果值
		alert(out);
		// 清除每次测量后的点符号
		this.map.events.clearMouseListener();
		if (order == 1) {
			// measureLengthTool.onClick();
		} else {
			// measureAreaTool.onClick();
		}
		//
	}
});